package com.woniuxy.controller;

import com.woniuxy.entity.Depart;
import com.woniuxy.service.DepartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/department")
//@Api(tags = "员工管理")
public class DepartController {

    @Autowired
    private DepartService departService;

    /**
     * 查询所有车辆类型
     */
    @GetMapping("/findAll")
   // @ApiOperation("查询所有车辆类型")
    public ResponseEntity<List<Depart>> findAll() {
        System.out.println("查询所有车辆类型");
        List<Depart> departs = departService.list();
        return ResponseEntity.ok(departs);
    }


}
